import basicConfig from '@materials/questions/common/config/basicConfig'

export const meta = {
  title: '签名',
  type: 'text',
  componentName: 'SignatureModule',
  formConfig: [
    basicConfig,
    {
      name: 'placeholder',
      title: '引导提示文案',
      type: 'InputSetter',
      placeholder: '限制20字',
      key: 'placeholder',
      tip: '限制20字',
      maxNum: 20,
      validate(value) {
        if (value && value.length > 20) {
          console.warn('引导提示文案字数不能超过20个字，请修改后重新保存')
          return false
        }
        return true
      }
    }
  ],

  defaultConfigValue: {
    title: '签名',
    options: [],
    placeholder: '请手写签名'
  }
}

export default meta
